//
//  bizareaCellCollectionView.m
//  Gourment
//
//  Created by lanou3g on 15/12/9.
//  Copyright © 2015年 DGY. All rights reserved.
//

#import "bizareaCellCollectionView.h"
#import "bizareaCollectionCell.h"
#import "YTLineLayout.h"

@interface bizareaCellCollectionView()<UICollectionViewDelegate,UICollectionViewDataSource>

@property (nonatomic,strong)UICollectionView *lineView;

@end

@implementation bizareaCellCollectionView

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    [self configView];
    return self;
}

-(void)configView{
    _lineView=[[UICollectionView alloc]initWithFrame:self.frame collectionViewLayout:[[YTLineLayout alloc]init]];
    _lineView.delegate=self;
    _lineView.dataSource=self;
    [_lineView registerNib:[UINib nibWithNibName:@"bizareaCollectionCell" bundle:nil] forCellWithReuseIdentifier:@"bizareaCell"];
    
    
    [self addSubview:_lineView];

}

-(void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath{

}
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
    return 1;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{

    return 10;
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
  bizareaCollectionCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"bizareaCell" forIndexPath:indexPath];
    cell.upField.text=@"测试";
    return cell;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
